<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>查看消息</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="__ADMIN_STATIC__/css/oksub.css">
	<script type="text/javascript" src="__STATIC__/lib/loading/okLoading.js"></script>
</head>
<body>
<div class="ok-body">
	<blockquote class="layui-elem-quote">
		<p>留言详情</p>
	</blockquote>
	<blockquote class="layui-elem-quote layui-quote-nm">
		<form class="layui-form">
			<table class="layui-table">
				<colgroup>
					<col width="200">
					<col>
				</colgroup>
				<thead>
				<tr>
					<th>参数</th>
					<th>参数值</th>
				</tr>
				</thead>
				<tbody>
				<tr>
					<td>消息ID</td>
					<td>{$model.id}</td>
				</tr>
				<tr>
					<td>联系名称</td>
					<td>{$model.name}</td>
				</tr>
				<tr>
					<td>联系邮箱</td>
					<td>{$model.email}</td>
				</tr>
				<tr>
					<td>发起者</td>
					<td>{$model.username}</td>
				</tr>
				<tr>
					<td>消息标题</td>
					<td>{$model.title}</td>
				</tr>
				<tr>
					<td>消息内容</td>
					<td>{$model.message}</td>
				</tr>
				<tr>
					<td>创建时间</td>
					<td>{$model.create_time}</td>
				</tr>
				</tbody>
			</table>
		</form>
	</blockquote>

	<!-- form -->
	<form class="layui-form">

		<div class="layui-form-item  top-25">
			<label class="layui-form-label">接收邮箱</label>
			<div class="layui-input-block">
				<input value="{$model.email}" type="email" name="email" required  lay-verify="required|email" placeholder="接收邮箱" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-form-item  top-25">
			<label class="layui-form-label">标题</label>
			<div class="layui-input-block">
				<input type="text" name="title" required  lay-verify="required" placeholder="标题" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-form-item  top-25 layui-form-text">
			<label class="layui-form-label">消息</label>
			<div class="layui-input-block">
				<textarea name="message" required  lay-verify="required" placeholder="请输入内容" class="layui-textarea"></textarea>
			</div>
		</div>
		<div class="layui-form-item  top-25">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit lay-filter="formMessage">提交发送</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
</div>
<!--js逻辑-->
<script src="__STATIC__/lib/layui/layui.js"></script>
<script>
	layui.use(["form", "okUtils", "okLayer"], function () {

		let form = layui.form;
		let okUtils = layui.okUtils;
		let okLayer = layui.okLayer;

		okLoading.close();
		form.on("submit(formMessage)", function (data) {
			console.log('待完成...');
			/*okUtils.ajax("{:url('comment/update',['id'=>$model->id])}", "post", data.field, true).done(function (response) {
				okLayer.greenTickMsg(response.msg, function () {
					parent.layer.close(parent.layer.getFrameIndex(window.name));
				});
			}).fail(function (error) {
				console.log(error)
			});*/
			return false;
		});
	});
</script>
</body>
</html>
